#pragma once

#include "logger_api.hpp"
#include "io/console_writer.hpp"
#include <memory>

//#include <spdlog/spdlog.h>
//#include <spdlog/sinks/stdout_color_sinks.h> // 用于彩色控制台输出


// 控制台输出器实现
class ConsoleSink : public ISink {
public:
    ConsoleSink(const std::string& sink_name = "my_console_logger_instance");
    ~ConsoleSink() override;

    void log(LogLevel level, const std::string& formatted_message) override;

    std::string getName() override { return m_sinkName; }

private:
    std::string m_sinkName; // 用于spdlog::drop
    std::unique_ptr<axon_logger::io::ConsoleWriter> m_writer;

};
